import logging
import yagmail

#封装日志
def setup():
    logging.basicConfig(filename='./log/kongfz.txt',level=logging.DEBUG,filemode='w+',format='%(asctime)s ->%(levelname)s ->%(message)s',encoding='utf-8')

#封装邮件
def youji(filep):
    mail=yagmail.SMTP(user='1006142636@qq.com',host='smtp.qq.com',password='mduzpggkpknubgac')
    mail.send(to='1006142636@qq.com',subject='孔夫子报告',contents='今日报告请查看',attachments=filep)


